import java.util.ArrayList;

public class Store {
    private String name;
    private String goodsType;
    private ArrayList<Good> goods = new ArrayList<>();//内部拥有的货物

    public Store(String name, String goodsType) {
        this.name = name;
        this.goodsType = goodsType;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setGoodsType(String goodsType) {
        this.goodsType = goodsType;
    }

    public String getName() {
        return name;
    }

    public String getGoodsType() {
        return goodsType;
    }

    @Override
    public String toString() {
        return "Store{" +
                "name='" + name + '\'' +
                ", goodsType='" + goodsType + '\'' +
                '}';
    }

    public void showAll(){ //进入店家
        goods.forEach(System.out::println);
    }
}
